<template>
	<view class="page-fade-in" :style="{opacity: pageOpc}">
		<template v-if="pageOpc">
			<view class="content">
				<view class="rich-box" @tap="makePhoneCall" v-html="richCont"></view>
			</view>
		</template>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				pageOpc:0,
				phoneNumber:'18884768360',
				richCont:""
			}
		},
		onLoad() {
			this.getRich();
		},
		onReady(){
			setTimeout(() => {
				this.pageOpc=1
			}, 100)
		},
		methods: {
			// 拨打电话
			makePhoneCall() {
				let that = this
				uni.makePhoneCall({
					phoneNumber:that.phoneNumber
				})
			},
			// 获取富文本
			getRich(){
				this.$request.post(this.$api.inviteInfo, {}, {
					token:true
				}).then(res => {
					let {
						data = {}
					} = res;
					if (res.code==1) {
						this.richCont=data.join_set_up
						this.richCont= this.richCont.replace(/\<img/gi, '<img style="width: 100% !important;height: 100%"');
					}
				})
			}
		}
	}
</script>

<style>

</style>
